<?php /*a:3:{s:81:"E:\project_git\data_management_background\application\store\view\trade\habit.html";i:1577345708;s:74:"E:\project_git\data_management_background\application\admin\view\main.html";i:1577345708;s:88:"E:\project_git\data_management_background\application\store\view\trade\habit_search.html";i:1577345708;}*/ ?>
<div class="layui-card layui-bg-gray"><?php if(!(empty($title) || (($title instanceof \think\Collection || $title instanceof \think\Paginator ) && $title->isEmpty()))): ?><div class="layui-card-header layui-anim layui-anim-fadein notselect"><span class="layui-icon layui-icon-next font-s10 color-desc margin-right-5"></span><?php echo htmlentities((isset($title) && ($title !== '')?$title:'')); ?><div class="pull-right"></div></div><?php endif; ?><div class="layui-card-body layui-anim layui-anim-upbit"><style>    .store-total-container {
        font-size: 14px;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }
    .store-total-container .store-total-item > div:nth-child(2) {
        font-size: 46px;
        line-height: 46px;
    }
    @media screen and (min-device-width: 992px) {
        .game_distribution {
            width: 50%;
        }
    }
    ::-webkit-scrollbar {width: 10px;height: 10px;background-color: rgba(240, 240, 240, 1);}
</style><div class="think-box-shadow"><fieldset><legend>条件搜索</legend><form class="layui-form layui-form-pane form-search" action="<?php echo request()->url(); ?>" onsubmit="return false" method="get" autocomplete="off"><div class="layui-form-item layui-inline" ><label class="layui-form-label">时间</label><div class="layui-input-inline"><input data-date-input name="search_time" value="<?php echo htmlentities((app('request')->get('search_time') ?: $start_time)); ?>" placeholder="请选择时间" class="layui-input"></div></div><div class="layui-form-item layui-inline"><button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button><button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button></div></form><script>form.render()</script></fieldset><?php if(!(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty()))): ?><div class="layui_table_width_scroll_36" ><table class="layui-table margin-top-10" lay-skin="line" ><thead><tr><th class="text-left nowrap">日期</th><th class='text-left'>计费点</th><th class='text-left'>付费人数</th><th class='text-left'>付费次数</th><th class='text-left'>新用户付费次数</th><th class='text-left'>付费金额</th><th class='text-left'>金额占比</th></tr></thead><tbody><?php foreach($list as $key=>$vo): ?><tr><td class='text-left nowrap'><?php echo htmlentities($vo['time']); ?></td><td class='text-left nowrap'><?php echo htmlentities($vo['billing_name']); ?></td><td class='text-left nowrap'><?php echo htmlentities($vo['recharge_num']); ?></td><td class='text-left nowrap'><?php echo htmlentities($vo['count']); ?></td><td class='text-left nowrap'><?php echo htmlentities($vo['new_user_recharge_count']); ?></td><td class='text-left nowrap'><?php echo htmlentities($vo['recharge']); ?></td><td class='text-left nowrap'><?php echo htmlentities($vo['rate']); ?></td></tr><?php endforeach; ?></tbody></table></div><table class="layui-table margin-top-10" lay-skin="line" ><thead><tr><th class="text-left nowrap" style="padding-left: 3em;" >合计</th><th class='text-left nowrap'>付费人数:<?php echo array_sum(array_column($list,'recharge_num')); ?></th><th class='text-left nowrap'>付费次数:<?php echo array_sum(array_column($list,'count')); ?></th><th class='text-left nowrap'>新用户付费次数:<?php echo array_sum(array_column($list,'new_user_recharge_count')); ?></th><th class='text-left nowrap'>付费金额:<?php echo array_sum(array_column($list,'recharge')); ?></th></tr></thead></table><div class="think-box-shadow store-total-container notselect"><div class="layui-row layui-col-space15"><div class="margin-bottom-15">计费点充值分布 <b style="font-size: 12px;color: #ccc;"></b></div><div id="billing_user_recharge" style="height:850px;"></div></div></div><div class="think-box-shadow store-total-container notselect"><div class="layui-row layui-col-space15"><div class="margin-bottom-15">计费点付费次数分布 <b style="font-size: 12px;color: #ccc;"></b></div><div id="billing_user_recharge_num" style="height:850px;"></div></div></div><script>        require(['echarts'], function (echarts, chart) {
            chart = echarts.init(document.getElementById('billing_user_recharge'));
            window.onresize = chart.resize;
            var seriesLabel = {
                normal: {
                    show: true,
                    textBorderWidth: 1
                }
            }
            option = {
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'shadow'
                    }
                },
                legend: {
                    data:['计费点充值分布']
                },
                grid: {
                    left: 180
                },
                toolbox: {
                    show: true,
                    feature: {
                        saveAsImage: {}
                    }
                },
                xAxis: {
                    type: 'value',
                    axisLabel: {
                        formatter: '{value}'
                    },
                    splitLine: {
                        lineStyle: {
                            type: 'dashed',
                        }
                    }
                },
                yAxis: {
                    type: 'category',
                    inverse: true,
                    data: eval('<?php echo json_encode($user_billing_count['billing']); ?>'),
                    axisLabel: {
                        margin: 20,
                        rich: {
                            value: {
                                lineHeight: 50,
                                align: 'left'
                            },
                        }
                    }
                },
                series: [
                    {
                        name:'计费点充值分布',
                        type: 'bar',
                        label: seriesLabel,
                        data: eval('<?php echo json_encode($user_billing_count['recharge']); ?>'),
                        itemStyle: {
                            normal: {
                                borderWidth: 10,
                                color: '#dd9c4b'
                            }
                        }
                    }
                ]
            };
            chart.setOption(option);
        });
    </script><script>        require(['echarts'], function (echarts, chart) {
            chart = echarts.init(document.getElementById('billing_user_recharge_num'));
            window.onresize = chart.resize;
            var seriesLabel = {
                normal: {
                    show: true,
                    textBorderWidth: 1
                }
            }
            option = {
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'shadow'
                    }
                },
                legend: {
                    data:['计费点付费次数分布']
                },
                grid: {
                    left: 180
                },
                toolbox: {
                    show: true,
                    feature: {
                        saveAsImage: {}
                    }
                },
                xAxis: {
                    type: 'value',
                    axisLabel: {
                        formatter: '{value}'
                    },
                    splitLine: {
                        lineStyle: {
                            type: 'dashed',
                        }
                    }
                },
                yAxis: {
                    type: 'category',
                    inverse: true,
                    data: eval('<?php echo json_encode($user_billing_num['billing']); ?>'),
                    axisLabel: {
                        margin: 20,
                        rich: {
                            value: {
                                lineHeight: 50,
                                align: 'left'
                            },
                        }
                    }
                },
                series: [
                    {
                        name:'计费点付费次数分布',
                        type: 'bar',
                        label: seriesLabel,
                        data: eval('<?php echo json_encode($user_billing_num['count']); ?>'),
                        itemStyle: {
                            normal: {
                                borderWidth: 10,
                                color: '#dd6823'
                            }
                        }
                    }
                ]
            };
            chart.setOption(option);
        });
    </script><?php else: ?><span class="notdata">没有记录哦</span><?php endif; ?></div></div>